home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / WINER.ZIP / CHAP6-1.BAS < prev    next >
BASIC Source File  |  1992-05-13  |  518b  |  28 lines

  1. '*********** CHAP6-1.BAS - shows how to direct printed output
  2.  
  3. 'Copyright (c) 1992 Ethan Winer
  4.  
  5. PRINT "Printer, Screen, or File? (P/S/F): ";
  6.  
  7. DO
  8.   Choice$ = UCASE$(INKEY$)
  9. LOOP UNTIL INSTR(" PSF", Choice$) > 1
  10.  
  11. IF Choice$ = "P" THEN
  12.   Report$ = "LPT1:"
  13. ELSEIF Choice$ = "S" THEN
  14.   Report$ = "SCRN:"
  15. ELSE
  16.   PRINT
  17.   LINE INPUT "Enter a file name: ", Report$
  18. END IF
  19.  
  20. OPEN Report$ FOR OUTPUT AS #1
  21.   PRINT #1, Header$
  22.   PRINT #1, SomeStuff$
  23.   PRINT #1, MoreStuff$
  24.     ...
  25.     ...
  26.   CLOSE #1
  27. END
  28.